package com.hzy.app;

import com.hzy.app.verticle.ConsumerVerticle;
import com.hzy.app.verticle.MainVerticle;
import io.vertx.core.DeploymentOptions;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;

import java.util.concurrent.TimeUnit;


public class Main {

    public static void main(String[] args) {
        VertxOptions options = new VertxOptions()
                .setEventLoopPoolSize(30)
                .setMaxEventLoopExecuteTime(1)
                .setMaxEventLoopExecuteTimeUnit(TimeUnit.SECONDS);
        Vertx vertx = Vertx.vertx(options);

        DeploymentOptions deploymentOptions = new DeploymentOptions().setInstances(1);
        vertx.deployVerticle(MainVerticle.class.getName(), deploymentOptions);
        vertx.deployVerticle(ConsumerVerticle.class.getName(), deploymentOptions);
    }
}
